# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataform.V1beta1.Model.InvocationConfig do
  @moduledoc """
  Includes various configuration options for a workflow invocation. If both `included_targets` and `included_tags` are unset, all actions will be included.

  ## Attributes

  *   `fullyRefreshIncrementalTablesEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. When set to true, any incremental tables will be fully refreshed.
  *   `includedTags` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The set of tags to include.
  *   `includedTargets` (*type:* `list(GoogleApi.Dataform.V1beta1.Model.Target.t)`, *default:* `nil`) - Optional. The set of action identifiers to include.
  *   `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Optional. The service account to run workflow invocations under.
  *   `transitiveDependenciesIncluded` (*type:* `boolean()`, *default:* `nil`) - Optional. When set to true, transitive dependencies of included actions will be executed.
  *   `transitiveDependentsIncluded` (*type:* `boolean()`, *default:* `nil`) - Optional. When set to true, transitive dependents of included actions will be executed.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :fullyRefreshIncrementalTablesEnabled => boolean() | nil,
          :includedTags => list(String.t()) | nil,
          :includedTargets => list(GoogleApi.Dataform.V1beta1.Model.Target.t()) | nil,
          :serviceAccount => String.t() | nil,
          :transitiveDependenciesIncluded => boolean() | nil,
          :transitiveDependentsIncluded => boolean() | nil
        }

  field(:fullyRefreshIncrementalTablesEnabled)
  field(:includedTags, type: :list)
  field(:includedTargets, as: GoogleApi.Dataform.V1beta1.Model.Target, type: :list)
  field(:serviceAccount)
  field(:transitiveDependenciesIncluded)
  field(:transitiveDependentsIncluded)
end

defimpl Poison.Decoder, for: GoogleApi.Dataform.V1beta1.Model.InvocationConfig do
  def decode(value, options) do
    GoogleApi.Dataform.V1beta1.Model.InvocationConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataform.V1beta1.Model.InvocationConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
